package cn.auction.biz;

import cn.auction.entity.Auction;
import cn.auction.entity.AuctionPage;
import cn.auction.entity.Auctionrecord;
import cn.auction.entity.EndAuction;

import java.sql.SQLException;
import java.util.List;

public interface AuctionBiz {
    public AuctionPage<Auction> showAllAuction(Auction condition, int pageIndex) throws SQLException;
    public List<Auction> showAllAuctio(String newSql) throws SQLException;
    //新增
    public int AddAuction(Auction auction) throws SQLException;
    //根据商品id回显数据
    public Auction ShowAuctionById(int id) throws SQLException;
    //修改拍卖品
    public int UpdateAuction(Auction auction) throws SQLException;
    //删除
    public int deleteAuction(int auctionId) throws SQLException;
    //查看出价记录
    public List<Auctionrecord> showAuctionrecord(int auctionId) throws SQLException;
    //新增竞拍记录
    public int AddAuctionrecord(int userId, int auctionId, double auctionPrice) throws SQLException;
    //查看拍卖结束的商品
    public List<EndAuction> showEndTimeAuction() throws SQLException;
    //查看拍卖商品中的名称
    public List<EndAuction> showAuctionNowTime() throws SQLException;
}
